package com.itheima.reggie.mapper;

import com.itheima.reggie.entity.OrderDetail;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface OrdersDetailMapper {

    //保存订单细节
    void save(List<OrderDetail> orderDetails);

    //通过id订单号来获取订单细节
    @Select("SELECT *  FROM order_detail where order_id = #{id};")
    List<OrderDetail> findByOrderID(Long id);

}
